<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org" 
      xmlns:sec="http://www.pollix.at/thymeleaf/shiro">
<head th:replace="admin/common/html/head :: head_Normal(~{::title},~{::link},~{::style})">

<title th:text=${title}></title>
<!-- 这儿引用单独的css link -->
<!-- Ladda for Bootstrap 3按钮加载进度插件 -->
<link rel="stylesheet" th:href="@{/static/admin/assets/js/button/ladda/ladda.min.css}">
<!-- bootstrap-table表单样式 -->
<link th:href="@{/static/admin/assets/js/bootstrap/css/bootstrap-table/bootstrap-table.min.css}" rel="stylesheet"/>

<style type="text/css">
/**
*这里写单独的css样式
*/

</style>

</head>

<body id="listbody">
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 代码编写处 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->

<!-- 右边内容 -->
<div class="wrap-fluid">
    <div class="container-fluid paper-wrap bevel tlbr">
        <!-- 内容 -->
        <!--标题 通用-->
        <div th:replace="admin/common/html/title :: title(${title},${parenttitle},${isMsg},${msgHTML})">
        </div>
        <!-- 结束标题 通用-->
        <div class="content-wrap">
            <!-- 结束内容 -->
            <div class="row">
                <div class="col-sm-12">
                <!-- 搜索条件 -->
                
                	 <div class="nest" id="inlineClose">
                            <div class="title-alt">
                                <h6>搜索条件</h6>
                                <div class="titleClose">
                                    <a class="gone" href="#inlineClose">
                                        <span class="entypo-cancel"></span>
                                    </a>
                                </div>
                                <div class="titleToggle">
                                    <a class="nav-toggle-alt" href="#search_div" >
                                        <span class="entypo-down-open"></span>
                                    </a>
                                </div>
                            </div>

                            <div class="body-nest" id="search_div" style="display: none">
                                <div class="form_left">
                                    <form role="form" class="form-inline">
                                        <div class="form-group">
                                            <label for="exampleInputEmail2" class="sr-only">搜索标题</label>
                                            <input type="text" name="searchTxt" placeholder="搜索标题"class="form-control">
                                        </div>
                                        <button onclick="$.table.search(this)" class="btn btn-success" type="button"><i class="fa fa-search"></i>&nbsp;搜索</button>
                                    </form>
                                </div>
                            </div>
                        </div>
                	<!-- END搜索条件 -->
                    <!-- 空白页开始-->
                    <div class="nest" id="Blank_PageClose">
                        <div class="title-alt">
                            <h6>表单</h6>
                            <div class="titleClose">
                                <a class="gone" href="#Blank_PageClose">
                                    <span class="entypo-cancel"></span>
                                </a>
                            </div>
                            <div class="titleToggle">
                                <a class="nav-toggle-alt" href="#Blank_Page_Content">
                                    <span class="entypo-up-open"></span>
                                </a>
                            </div>
                        </div>
                        
                        <div class="body-nest" id="Blank_Page_Content">
                            <!-- 工具条 end-->
                           <table id="dataTable" class="table-striped footable-res footable metro-blue" data-page-size="6">
                                   
                           </table>
                        </div>
                    </div>
                </div>
                <!-- 空白页结束 -->
            </div>
            <!-- 结束内容 -->
        </div>
    </div>
</div>
<!-- 结束右边内容 -->
<!-- # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # 代码编写处 END# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # -->





<!-- <div aria-labelledby="myLargeModalLabel" role="dialog" tabindex="-1" class="modal fade bs-example-modal-lg" style="display: none;" id="myModal">
   <div class="modal-dialog modal-lg">
       <div class="modal-content">

           <div class="modal-header">
               <button aria-hidden="true" data-dismiss="modal" class="close" type="button">
                   <span class="entypo-cancel"></span>
               </button>
               <h6 id="myLargeModalLabel" class="modal-title">公告详情</h6>
           </div>
           <div class="modal-body">
               <div class="compose_mail">
                   <form role="form">
                       <div class="form-group">
                           <div >嘻嘻嘻嘻嘻嘻嘻</div>
                       </div>
                       <div class="form-group">
                           <input type="email" placeholder="Subject" id="exampleInputPassword1" class="form-control">
                       </div>

                       <div class="btn-group">
                           <button data-toggle="dropdown" class="btn dropdown-toggle" type="button">
                               <span class="fontawesome-font"></span>Normal text
                               <span class="caret"></span>
                           </button>
                           <ul role="menu" class="dropdown-menu">
                               <li><a href="#">Action</a>
                               </li>
                               <li><a href="#">Another action</a>
                               </li>
                               <li><a href="#">Something else here</a>
                               </li>

                           </ul>

                       </div>
                       <div class="btn-group">
                           <button type="button" class="btn">
                               <span class="fontawesome-bold"></span>
                           </button>
                           <button type="button" class="btn">
                               <span class="fontawesome-italic"></span>
                           </button>
                           <button type="button" class="btn">
                               <span class="fontawesome-underline"></span>
                           </button>
                       </div>

                       <div class="btn-group">
                           <button type="button" class="btn">
                               <span class="fontawesome-list-ul"></span>
                           </button>
                           <button type="button" class="btn">
                               <span class="fontawesome-list-ol"></span>
                           </button>
                           <button type="button" class="btn">
                               <span class="fontawesome-indent-left"></span>
                           </button>
                           <button type="button" class="btn">
                               <span class="fontawesome-indent-right"></span>
                           </button>

                       </div>


                       <button type="button" class="btn">
                           <span class="entypo-link"></span>
                       </button>
                       <button type="button" class="btn">
                           <span class="entypo-attach"></span>
                       </button>
                       <button type="button" class="btn">
                           <span class="fontawesome-table"></span>
                       </button>
                       <button type="button" class="btn">
                           <span class="fontawesome-camera"></span>
                       </button>


                       <textarea style="height:200px!important;margin:20px 0" class="form-control" rows="8"></textarea>


                        <button class="btn" type="submit">Send</button>
                        <button class="btn" type="submit">
                            <span class="fontawesome-save"></span>&nbsp;&nbsp;Save as Draft</button>
                    </form>

                </div>

            </div>
        </div>

    </div>

</div> -->






<!-- 右侧隐藏滑块内容 -->
<div th:include="admin/common/html/rightHide :: rightHide">
    
</div>
   <!-- END 右侧隐藏滑块内容-->

<!-- 通用js -->
<div th:include="admin/common/html/js :: onload_js">
   
</div>
<!-- bootstarp 表格 -->
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/bootstrap-table.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/bootstrap-table/locale/bootstrap-table-zh-CN.min.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/js/base_list.js}" type="text/javascript"></script>
<!-- jquery-export 表格导出插件 -->
<script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/bootstrap-table-export.js}" type="text/javascript"></script>
<script th:src="@{/static/admin/assets/js/bootstrap/extensions/export/tableExport.js}" type="text/javascript"></script>

<!-- 弹窗 -->
<script th:src="@{/static/admin/assets/js/layer/layer.js}" type="text/javascript"></script>
<!-- 遮罩层 -->
<script th:src="@{/static/admin/assets/js/blockUI/jquery.blockUI.js}" type="text/javascript"></script>

<script type="text/javascript">

      	   	      	      	      	      	      	      	      
<!-- 导出 -->
var dataUrl=window.rootPath+"/SysNoticeController/viewUserlist";
var viewUrl=window.rootPath+"/SysNoticeController/viewinfo/{id}";
var exportUrl=window.rootPath+"/SysNoticeController/viewUserlist";
  var options = {
		dataUrl: dataUrl,
        exportUrl: exportUrl,
        sortName: "roleSort",
        modalName: "公告",
        search: false,
	   dataColumns: [
			{
			    checkbox: true
			},
			{
			    field: 'id',
			    title: '主键',
			    visible: false, //隐藏
			    //searchable: false,//搜索
			    //sortable:false,//设置true为允许列可以排序
			    //order: asc //排序顺序
			},
			{
			    field: 'title',
			    title: '标题',
			    //visible: false, //隐藏
			    //searchable: false,//搜索
			    //sortable:false,//设置true为允许列可以排序
			    //order: asc //排序顺序
			},
			{
			    field: 'content',
			    title: '内容',
			    formatter: function (value, row, index) {
			        var actions = [];
			        var len=value.length;
			        if(len>10){
			        	 actions.push(value.substring(0,8)+"...");
			        }else{
			        	 actions.push(value);
			        }
			      	return actions.join('');			    
				 }
			    //visible: false, //隐藏
			    //searchable: false,//搜索
			    //sortable:false,//设置true为允许列可以排序
			    //order: asc //排序顺序
			},
			{
			    field: 'type',
			    title: '类型',
			    formatter: function (value, row, index) {
			        var actions = [];
			        if(value==1){
			        	 actions.push('<span class="label label-primary">一般</span>');
			        }else if(value==2){
			        	 actions.push('<span class="label label-danger">重要</span>');
			        }
			      	return actions.join('');			    
				 }
			    //visible: false, //隐藏
			    //searchable: false,//搜索
			    //sortable:false,//设置true为允许列可以排序
			    //order: asc //排序顺序
			},
			{
			    field: 'createUsername',
			    title: '创建人',
			    //visible: false, //隐藏
			    //searchable: false,//搜索
			    //sortable:false,//设置true为允许列可以排序
			    //order: asc //排序顺序
			},
			{
			    field: 'createTime',
			    title: '创建时间',
			    //visible: false, //隐藏
			    //searchable: false,//搜索
			    //sortable:false,//设置true为允许列可以排序
			    //order: asc //排序顺序
			},

/*	
参照修改注释
		{
			    field: 'xxstate',
			    title: 'xx状态',
		    	formatter: function (value, row, index) {
			        var actions = [];
			        if(value==0){
			        	 actions.push('<span class="label label-primary">关闭</span>');
			        }else if(value==1){
			        	 actions.push('<span class="label label-danger">开启</span>');
			        }
			      	return actions.join('');			    
				 }
			}
*/
			{
			    title: '操作',
			    formatter: function (value, row, index) {
			        var id = row.id;
			        var actions = [];
			        actions.push('<a class="btn btn-info btn-xs" href="'+window.rootPath+'/SysNoticeController/viewinfo/'+row.id+'")><i class="fa fa-search"></i>查看</a>');
			        return actions.join('');
			    }
			}]
  };
$(function(){
	var oTab=$.table.oTableInit(options);
	oTab.Init();
})

$.operate.view=function(id) {
    var url = $.common.isEmpty(id) ? viewUrl : viewUrl.replace("{id}", id);
    $.modal.open($.table._option.modalName+"详情", url);
},

$.modal.open=function(title, url, width, height) {
    if (navigator.userAgent.match(/(iPhone|iPod|Android|ios)/i)) {
        width = "auto";
        height = "auto";
    }
    if ($.common.isEmpty(title)) {
        title = false;
    }
    if ($.common.isEmpty(url)) {
        url = "404.html";
    }
    if ($.common.isEmpty(width)) {
        width = 800;
    }
    if ($.common.isEmpty(height)) {
        height = ($(window).height() - 50);
    }
    var perContent =layer.open({
        type: 2,
        area: ['100%', '100%'],
        fix: false,
        maxmin: true,
        shade: 0.3,
        title: title,
        content: url
    })
    layer.full(perContent);
}
</script>

</body>


</html>
